<template>
  <div class="download-list">
    <ul>
      <li v-for="(item,index) in downloading" :key="index">
        <div class="fleft do-t-div">
          <a><img :src="$store.state.baseImgUrl+item.img" width="170" height="175"></a>
        </div>
        <div class="fleft do-t-main" style="width: 620px">
          <h1>{{ item.name }}</h1>
          <!--          <p>{{ item.info }}</p>-->
          <p>资料文件：{{ item.bookFiles.filter(item=>item.type==0).length}}个</p>
        </div>
        <div class="fleft do-data">

        </div>
        <div class="fleft do-more">
          <el-button @click="AudioDetail(item.id)"> 查看所有文件</el-button>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
// import ThingsContains from "@/router/pages/ThingsDownload/ThingsContains";
export default {
  name: "ThingsComponent",
  created() {
    // this.bookList = this.downloading
  },
  props: {
    downloading: {
      type: Array,
      defaults: () => []
    }
  },
  data() {
    return {
      sourceFileCount:null,
      // bookList: []
      // downloadList:[
      //   {
      //     imgSrc:'http://www.jyxue.com.cn/images/202109/thumb_img/1375_thumb_G_1631080313656.jpg',
      //     title: '2022现代文阅读解题攻略-配课件',
      //     info: '配课件',
      //     time: '2021-09-08',
      //   },
      //   {
      //     imgSrc:'http://www.jyxue.com.cn/images/202109/thumb_img/1375_thumb_G_1631080313656.jpg',
      //     title: '2022现代文阅读解题攻略-配课件',
      //     info: '配课件',
      //     time: '2021-09-08',
      //   },
      //   {
      //     imgSrc:'http://www.jyxue.com.cn/images/202109/thumb_img/1375_thumb_G_1631080313656.jpg',
      //     title: '2022现代文阅读解题攻略-配课件',
      //     info: '配课件',
      //     time: '2021-09-08',
      //   },
      //   {
      //     imgSrc:'http://www.jyxue.com.cn/images/202109/thumb_img/1375_thumb_G_1631080313656.jpg',
      //     title: '2022现代文阅读解题攻略-配课件',
      //     info: '配课件',
      //     time: '2021-09-08',
      //   },
      //   {
      //     imgSrc:'http://www.jyxue.com.cn/images/202109/thumb_img/1375_thumb_G_1631080313656.jpg',
      //     title: '2022现代文阅读解题攻略-配课件',
      //     info: '配课件',
      //     time: '2021-09-08',
      //   },
      // ]
    }
  },
  methods:{
    AudioDetail(bookId){
      this.$router.push({path:'/purchasePage',query:{curBookId:bookId,dialogStatus:true}})
    }
  },
  components: {
    // ThingsContains
  }
}
</script>

<style scoped>
.download-list {
  overflow: hidden;
  border-top: 1px solid #cfd7e5;
  width: 72em;
  margin: 0 auto;
}

.download-list ul li {
  border-bottom: 1px solid #cfd7e5;
  padding: 26px 0;
  overflow: hidden;
}

.do-t-div {
  width: 242px;
  height: 145px;
}

.fleft, .uleft li {
  float: left;
  display: inline;
}

.do-t-div a {
  width: 242px;
  height: 145px;
  display: table-cell;
  text-align: center;
  vertical-align: middle;
}

.do-t-main {
  padding: 0 34px;
  width: 475px;
}

.fleft, .uleft li {
  float: left;
  display: inline;
}

.do-t-main h1 {
  font-size: 24px;
  margin-bottom: 20px;
  margin-top: 16px;
}

.do-t-main h1 a {
  color: #000;
}

.do-t-main p {
  text-indent: 30px;
}

.do-data {
  border-left: 1px solid #dedddd;
  border-right: 1px solid #dedddd;
  width: 135px;
  text-align: center;
  line-height: 145px;
}

.fleft, .uleft li {
  float: left;
  display: inline;
}

.do-more {
  padding: 55px 0 0 31px;
}

.fleft, .uleft li {
  float: left;
  display: inline;
}

.do-more a {
  width: 129px;
  height: 35px;
  display: block;
  /*background: url(../skin/icon18.png) no-repeat;*/
}

</style>